package umacis.data;

import java.util.Vector;

import com.sun.lwuit.util.Log;

public class ActionClasses {
	String actionClassNames[];
	
	class ActionClass {
		String name;
		boolean instantiated;
		
	}
	
	public ActionClasses(Vector classNames, Class[] classes) {
		int size1 = classNames.size();
		int size2 = classes.length;
		int totalsize = size1 + size2;
		actionClassNames = new String[totalsize];
		classNames.copyInto(actionClassNames);
		for (int i = size1; i<totalsize; i++) {
			actionClassNames[i] =  classes[i-size1].getName();
		}
	}
	
	private void instantiate(String actionClassName) {
		try {
			Class.forName(actionClassName).newInstance();
		} catch (InstantiationException e) {
			Log.p("Is this class an interface? Or abstract? " + actionClassName, Log.ERROR);
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			Log.p("Class probably has no no-argument constructor, or is not public"+ actionClassName, Log.ERROR);
			e.printStackTrace();
		} catch (ClassNotFoundException e) {
			Log.p("Class not found "+ actionClassName, Log.ERROR);
			e.printStackTrace();
		}
	}
}
